package cn.jark.mybatisplus;

import cn.jark.mybatisplus.config.MapperScanner;
import cn.jark.mybatisplus.config.MybatisplusProperties;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 雨一直夏灬(须知少年凌云志, 曾许人间第一流)
 * @since 2020-10-28
 */
@Configuration
@EnableConfigurationProperties({MybatisplusProperties.class})
@MapperScanner(basePackages = {"${jark.mybatis.mapper-scanner.base-packages}"})
public class MybatisAutoConfiguration {

    @Bean
    public MybatisPlusInterceptor paginationInterceptor() {
        return new MybatisPlusInterceptor();
    }
}
